#!/usr/bin/python3
# -*- coding: utf-8 -*-

import allure
from playwright.sync_api import Page

from models.base_page import BasePage
from models.home_page.home_page import HomePage


class HomeBusiness(BasePage):
    def __init__(self, page: Page):
        super().__init__(page)
        self.home_page = HomePage(page)

    @allure.step("导航到负载均衡器服务器证书列表页")
    def navigate_to_home_page(self, region=None):
        """导航到负载均衡器服务器证书列表页"""
        route = f"{self.home_page.route}"
        super().navigate(region, route)
        self.expect.to_have_title("工作台")